package com.hj.controller;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/show")
public class ShowDate {

	SimpleDateFormat timeSdf = new SimpleDateFormat("HH:mm:ss");
	SimpleDateFormat dateSdf = new SimpleDateFormat("yyyy/MM/dd");
	
	@GetMapping("/time")
	public Object showTime() {
		abc
		return "当前时间：==" + timeSdf.format(new Date());
	}
	
	@GetMapping("/date")
	public Object showDate() {
		return "当前日期：==" + dateSdf.format(new Date());
	}
	
}
